package cn.dankal.flyaudio.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import cn.dankal.basiclib.base.recyclerview.BaseRecyclerViewAdapter;
import cn.dankal.basiclib.base.recyclerview.BaseRecyclerViewHolder;
import cn.dankal.flyaudio.R;

public class HistoryItemAdapter extends BaseRecyclerViewAdapter<String> {
    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.item_search_history;
    }

    @Override
    protected BaseRecyclerViewHolder getViewHolder(ViewGroup parent, View rootView, int viewType) {
        return new ViewHolder(rootView);
    }

    class ViewHolder extends BaseRecyclerViewHolder<String>{

        public ViewHolder(View itemView) {
            super(itemView);
        }

        @Override
        public void onBindData(String data, int position) {
            ((TextView)itemView).setText(data);
        }
    }
}
